From: Roan Kattouw Date: Thu, 16 Jul 2009 08:04:15 +0000 (+0000) Subject: Revert r52190 ("Return HTTP 503 on API maxlag error"): announcement prompted many... X-Git-Tag: 1.31.0-rc.0~40895 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=0070e5c6e2da71b2870d77a71ac4240a4907aec2;p=lhc%2Fweb%2Fwiklou.git Revert r52190 ("Return HTTP 503 on API maxlag error"): announcement prompted many complaints, and the change never went live. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3f144ec375..1b65c01542 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -306,7 +306,6 @@ this. Was used when mwEmbed was going to be an extension. * (bug 18785) Add siprop=languages to meta=siteinfo * (bug 14200) Added user and excludeuser parameters to list=watchlist and list=recentchanges -* Return HTTP 503 status code on maxlag error, like index.php does * Added index, fromtitle and byteoffset fields to action=parse&prop=sections output * (bug 19313) action=rollback returns wrong revid on master/slave setups diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 17fa068f8c..825da48d9a 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -378,9 +378,9 @@ class ApiMain extends ApiBase { header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) ); header( 'X-Database-Lag: ' . intval( $lag ) ); if( $wgShowHostnames ) { - $this->dieUsage( "Waiting for $host: $lag seconds lagged", 'maxlag', 503 ); + $this->dieUsage( "Waiting for $host: $lag seconds lagged", 'maxlag' ); } else { - $this->dieUsage( "Waiting for a database server: $lag seconds lagged", 'maxlag', 503 ); + $this->dieUsage( "Waiting for a database server: $lag seconds lagged", 'maxlag' ); } return; }